<?php
namespace app\yunda\home;

use app\yunda\model\Member as MemberModel;
use app\yunda\model\User;
use think\Db;

/**
 * 申请会员
 * @package app\yunda\home
 */
class Member extends Base {


    // 获取会员等级设定
    public function index(){
        // 查询字段
        $map = $this->getMap();
        $Member = new MemberModel();
        // 自定义where查询
        $data =  $Member
            ->order('id desc')
            ->where($map)
            ->select();
        $data=collection($data)->toArray();
        foreach ($data as &$v){
            $v['level_name']=config('member_level')[$v['level']];
        }
        return mogo_json($data);
    }





}